package meta.api.web.files.presentation.form;

import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

import meta.api.web.file.presentation.form.MetadataForm;

public class FilesForm implements Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 1L;

    /**
     * 文件名列表
     */
    @JsonProperty
    private List<String> filenames;

    /**
     * 名
     */
    @JsonProperty(value = "metadata.name")
    private String name;

    /**
     * 目录
     */
    @JsonProperty(value = "metadata.directory")
    private String directory;

    /**
     * 图片名
     */
    @JsonProperty(value = "metadata.imageFilename")
    private String imageName;

    /**
     * 图片URL
     */
    @JsonProperty(value = "metadata.image")
    private String imageUrl;

    /**
     * 物理删除标识
     */
    @JsonIgnore
    private Boolean physically;

    public MetadataForm convertToMetadataForm() {
        MetadataForm metadataForm = new MetadataForm();
        metadataForm.setDirectory(directory);
        metadataForm.setName(name);
        metadataForm.setImageName(imageName);
        metadataForm.setImageUrl(imageUrl);
        return metadataForm;
    }

    public List<String> getFilenames() {
        return filenames;
    }

    public void setFilenames(List<String> filenames) {
        this.filenames = filenames;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDirectory() {
        return directory;
    }

    public void setDirectory(String directory) {
        this.directory = directory;
    }

    public String getImageName() {
        return imageName;
    }

    public void setImageName(String imageName) {
        this.imageName = imageName;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public Boolean getPhysically() {
        return physically;
    }

    public void setPhysically(Boolean physically) {
        this.physically = physically;
    }
}
